﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NCT.MRS.DataAccessLayer.Entities
{
    public class User : IEntity
    {
        public User()
        {
            IsActive = true;
        }

        public int Id { get; set; }

        [MinLength(3)]
        public string FirstName { get; set; }

        [MinLength(3)]
        public string LastName { get; set; }

        [MinLength(3)]
        public string MiddleName { get; set; }

        [MinLength(5)]
        public string Username { get; set; }

        [MinLength(6)]
        public string Password { get; set; }
        public bool IsActive { get; set; }
        public DateTime DateAdded { get; set; }
        public DateTime DateModified { get; set; }

        public int RoleId { get; set; }
        public virtual Role Role { get; set; }

    }
}
